/**
 * @Description CourseTermDao接口
 * @author 20155872 游宇
 * @create 2018-05-17 14:09
 **/

package com.campus_information_portal.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @className CourseTermDao
 * @Description CourseTermDao接口
 * @author 20155872 游宇
 * @create 2018-05-17 14:09
 **/
public interface CourseTermDao {


    /**
     * @Description: 根据学生id和学期id 连接course表，course_term表，teacher表，stu_course_info表；
     * @author: 20155872 游宇
     * @methodName: getCourseNameAndTeName
     * @param:  int stuInfoId, int termId
     * @returnType: List<String[]>
     * @createTime: 2018/5/17 14:51
     **/
    @Select("select course_name,te_name from course c,course_term ct,teacher t,student_course_info sci where " +
            "c.course_id=sci.course_id and sci.course_id=ct.course_id and sci.term_id=ct.term_id and" +
            " t.te_info_id=ct.te_info_id and sci.stu_info_id=#{stuInfoId} and sci.term_id=#{termId}")
    List<Map<String,String>> getCourseNameAndTeName(@Param("stuInfoId") int stuInfoId, @Param("termId") int termId);






}
